package cn.iocoder.yudao.module.promotion.gift.api;

import cn.iocoder.yudao.module.api.promotion.gift.GiftRecordApi;
import cn.iocoder.yudao.module.promotion.gift.service.core.CoreGiftRecordService;
import jakarta.annotation.Nullable;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;

import java.util.Set;

/**
 * <pre>
 * OOoO0OOoO0OOOooo0oOOOO0OOOOO0oooOO0ooOOO0Ooooo0OOOOo0ooooO0OOooo0Ooooo0OOOOO
 *  这里是文件说明
 * OOoO0OOoO0OOOooo0oOOOO0OOOOO0oooOO0ooOOO0Ooooo0OOOOo0ooooO0OOooo0Ooooo0OOOOO
 * </pre>
 *
 * @author 山野羡民（1032694760@qq.com）
 * @since 2025/05/16
 */
@Service
@Validated
public class GiftRecordApiImpl implements GiftRecordApi {

    @Resource
    private CoreGiftRecordService coreGiftRecordService;

    @Override
    public boolean pending(Long userId, String tradeNo, Set<Long> giftActivityIds) {
        return coreGiftRecordService.pending(userId, tradeNo, giftActivityIds);
    }

    @Override
    public int getCountByUserId(Long userId, @Nullable Integer status) {
        return coreGiftRecordService.getCount(userId, status);
    }

}
